package com.example.zhihu.controller;


import com.baomidou.mybatisplus.extension.api.R;
import com.example.zhihu.entity.HotInfo;
import com.example.zhihu.service.IHotInfoService;
import com.example.zhihu.service.IWeekHotService;
import com.example.zhihu.vo.TopicsDataVo;
import com.example.zhihu.vo.WeekHotVo;
import java.util.List;
import javax.annotation.Resource;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2022-05-05
 */
@RestController
@RequestMapping("/week-hot")
public class WeekHotController {
  @Resource
  IHotInfoService iHotInfoService;

  @Resource
  IWeekHotService iWeekHotService;



  /**
   * 获取当前话题的热度数据
   * @return
   */
  @GetMapping("/topicData")
  public R<TopicsDataVo> getTopicsData(@Param("id") String id) {
    return R.ok(iWeekHotService.getTopicsData(id));
  }
}
